{strip}
{include file="common/header.tpl"}
<section class="main">
    <article class="right-col">      
        <h2>{$language.title.personal} &raquo; <a href="{$smarty.const.HOST_BACKEND}personal/add">{$language.ahref.add}</a></h2>
        <form name="frmSearch" id="frmSearch" action="{$smarty.const.HOST_BACKEND}personal/index" onsubmit="javascript:return actionSearch();" method="get" enctype="multipart/form-data">        
            {include file="personal/search.tpl"}
        </form>
        
        <form id="frmpersonal" name="frmpersonal" method="post" action="{$smarty.const.HOST_BACKEND}personal/act" enctype="multipart/form-data">
            <input type="hidden" name="paction" id="paction" />
            <input type="hidden" name="pcancelsearch" id="pcancelsearch"/>
            {include file="personal/button.tpl"}
            {if isset($arrResult) && is_array($arrResult) && count($arrResult) > 0}
                <div class="s-page">
                    <strong class="total">{$language.common.total}: {$intTotal}</strong>
                    {paging total=$intTotal limit=$intLimit offset=$intOffset}
                </div>
            {/if}
            <table width="100%" cellpadding="0" cellspacing="0" border="0" class="list">
                <thead>
                    <tr>
                        <th class="16"><input type="checkbox" name="pcheckall" id="pcheckall" onclick="javascript:checkAll(this.form,'ppersonalid[]',this.checked);"/></th>
                        <th class="150">{$language.label.name}</th>                        
                        <th class="80">{$language.label.nickname}</th>                        						                        
                        <th class="80">{$language.label.place}</th> 
                        <th class="150">{$language.label.birth}</th>                       
						<th class="150">{$language.label.short}</th>
                                                              					
                        <th>&nbsp;</th>
                    </tr>
                </thead>
                <tbody>
                    {if isset($arrResult)}
                    {foreach key=i item=item from=$arrResult}
						<tr>
							<td align="center"><input type="checkbox" name="ppersonalid[]" id="ppersonalid{$item.personalid}" value="{$item.personalid}"/></td>														
							<td class="150">{$item.firstname $item.lastname}</td>							
							<td class="80">{$item.nickname}</td>
							<td class="150">{$item.place_of_birth}</td>
                            <td class="150">{$item.birthdate|date_format:"%d/%m/%Y %H:%M:%I"}</td>							
							<td class="80">{$item.short}</td>	                            																									
							<td>                                       
                                <a href="{$smarty.const.HOST_BACKEND}personal/edit?personalid={$item.personalid}">{$language.ahref.edit}</a>
                                &nbsp;|&nbsp;                                                        
                                <a href="{$smarty.const.HOST_BACKEND}national/index?personalid={$item.personalid}">{$language.label.national}</a>
                                 &nbsp;|&nbsp;                                                        
                                <a href="{$smarty.const.HOST_BACKEND}contract/index?personalid={$item.personalid}">{$language.label.contract}</a>
                                 &nbsp;|&nbsp;                                                        
                                <a href="{$smarty.const.HOST_BACKEND}title/index?personalid={$item.personalid}">{$language.label.title}</a>
                            </td>
						</tr>
					{/foreach}
                    {/if}
                </tbody>
            </table>
            {if isset($arrResult) && is_array($arrResult) && count($arrResult) > 0}
                <div class="s-page">
                    <strong class="total">{$language.common.total}: {$intTotal}</strong>
                    {paging total=$intTotal limit=$intLimit offset=$intOffset}
                </div>
            {/if}            
            {include file="personal/button.tpl"}
        </form>
	</article>
</section>
{include file="common/footer.tpl"}
{/strip}
                
